<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=drive-width,initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="stylesheet" href="/login/login.css">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" media="screen" rel="stylesheet" type="text/css">
    <title>注册</title>
    <script type="text/javascript" src="/js/jquery.js"></script>
    <script src="/login/jquery-3.6.0.min.js"></script>

</head>
<body>
<div id="login-box">
    <h1>注册</h1>

    @if(isset($message))
        <div class="alert alert-success" style="text-align: center;padding-top: 10px;">
            <strong style="color: red">{{ $message }}!</strong>
        </div>
    @endif


    <div class="form">

        <form method="POST" action="{{ route('register') }}">
            <input type="hidden" name="_token" value="{{ csrf_token() }}">

            <div class="item">
                <i class="fa fa-user-circle-o" aria-hidden="true"></i>
                <input type="text" placeholder="昵称" name="nickname">
            </div>

            <div class="item">
                <i class="fa fa-user-circle-o" aria-hidden="true"></i>
                <input type="text" placeholder="邮箱" name="email">
            </div>

            <div class="item">
                <i class="fa fa-key" aria-hidden="true"></i>
                <input type="password" placeholder="密码" name="password">
            </div>

            <button type="submit" class="btn" style="border: none">注册</button>


            <div  style="color: white;margin-top: 20px;">
                已有账号?
                <a href="{{ route('login') }}" style="color: #3ba679">前往登录</a>
            </div>


        </form>

    </div>




</div>

</body>

<script>
    $(document).keypress(function(event) {
        var keycode = (event.keyCode ? event.keyCode : event.which);
        if(keycode == '13') {
            $('.btn').click();
        }
    });
</script>


</html>
